<?php

use yii\db\Migration;

class m170930_022406_add_member_alias extends Migration
{
    public function up()
    {
        $sql = <<<SQL
ALTER TABLE `member` ADD `alias` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL comment '极光推送别名' AFTER `product`;
SQL;
        $this->execute($sql);
    }

    public function down()
    {
        $sql = <<<SQL
ALTER TABLE `member` DROP `alias`;
SQL;
        $this->execute($sql);
        return true;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
